//
//  NSObject+JSON.h
//  mmbang
//
//  Created by 杨世昌 on 14/12/9.
//  Copyright (c) 2014年 iyaya. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSObject (JSON)

/**
 *  json string to dict
 *
 *  @param jsonString json
 *
 *  @return dict
 */
+ (NSDictionary *)jsonStringToDict:(NSString *)jsonString;


/**
 *  object to json data
 *
 *  @return to json data
 */
-(NSData *)toJsonData;


/**
 *  convert json to json string
 *
 *  @return jsonString
 */
-(NSString *)toJsonString;



#pragma mark - dictionary from attributes

- (NSDictionary *)dictionaryDescriptionForClassType:(Class)classType;

- (NSDictionary *)dictionaryFromAttributes;



#pragma mark - auto description

- (NSString *) autoDescriptionForClassType:(Class)classType;

- (NSString *) autoDescription;

@end
